package zozopo.flow.comm;

import java.util.List;
import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;

import zozopo.flow.operations.FlowOS;
import zozopo.flow.operations.FlowTB;


public class ManageFlowAction  extends ActionSupport implements Action,SessionAware{
	//传入参数
	private String searchStr = "";
	//分页参数
	private int beginPageNum = 0;
	private int pageSize = 20;
	private int rowNum = 0;
	//传出参数
	private List<FlowTB> flowList;
	
	private Map<Object, Object> session;
	public void setSession(Map arg0) {
		// TODO Auto-generated method stub
		session = arg0;
	}
	public String execute(){
		FlowOS flowOS = new FlowOS();
		flowList = flowOS.selectAll();
		rowNum = flowOS.getRowNum();
		flowOS.releaseConnection();
		//权限处理
		return SUCCESS;
	} 
	
	
	public String getSearchStr() {
		return searchStr;
	}
	public void setSearchStr(String searchStr) {
		this.searchStr = searchStr;
	}
	public int getBeginPageNum() {
		return beginPageNum;
	}
	public void setBeginPageNum(int beginPageNum) {
		this.beginPageNum = beginPageNum;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getRowNum() {
		return rowNum;
	}
	public void setRowNum(int rowNum) {
		this.rowNum = rowNum;
	}
	public List<FlowTB> getFlowList() {
		return flowList;
	}
	public void setFlowList(List<FlowTB> flowList) {
		this.flowList = flowList;
	}
}
